package com.tianyu.leyou.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import com.tianyu.leyou.model.UserBean;

public interface UserDao extends JpaRepository<UserBean, Integer> {

	public List<UserBean> findByUsernameAndSex(String name, String sex);
	
//	@Query(value = "from UserBean ub where ub.username= :usenam")
	@Query(value = "select * from tb_user where user_name= ?", nativeQuery = true)
	public List<UserBean> queryByName(String usenam);
	
	
}
